package com.sunxu.jvm.classloader;

/**
 * @author 孙许
 * @version 1.0
 * @date 2020/7/20 23:31
 */
public class MyClassLoaderDemo {

    public static void main(String[] args) throws ClassNotFoundException {
        MyClassLoader classLoader = new MyClassLoader("sunxu");
        Class<?> clazz = classLoader.findClass("com.sunxu.jvm.classloader.MyClass");
        System.out.println(((MyClassLoader) clazz.getClassLoader()).getName());
    }
}
